<template>
  <u-loadmore :status="moreObj.status" margin-top="20" margin-bottom="20"  :icon-type="moreObj.iconType" @loadmore="loadmore"/>
</template>

<script>
export default {
  name : 'index' ,
  props:{
    //更多数据
    moreObj:{
      type:Object,
      default:()=>{
        return {}
      }
    }
  },
  methods: {
    //加载更多数据
    loadmore(){
      this.$emit('load')
    },
  },
  //加载到底部进行请求新的数据
  onReachBottom() {
    if (this.moreObj.status === 'loadmore') {
      this.loadmore()
    }
  },
}
</script>

<style scoped>

</style>
